1. Field of the Invention
The present invention relates to an image processing apparatus and method, a program, and a recording medium. In particular, the invention relates to an image processing apparatus and method, a program, and a recording medium with which in any area of an image of an interpolation frame, it is possible to appropriately generate a pixel.
2. Description of the Related Art
Up to now, a frame interpolation processing can be performed on a television signal read out from a frame memory on the basis of average motion vector data of a plurality of pieces of motion vector data from a motion vector detection circuit which is configured to detect a motion of the television signal.
Generation of the interpolation frame is performed in the following manner, for example. Intersecting points on a frame at a time t and a frame at a time t+1 which are two frames associated by a motion vector v are set as a point q and a point r. Herein, a value of a pixel p on a frame at a time t+k which is a new frame between the frame at the time t and the frame at the time t+1 is subjected to a linear interpolation by an inverse ratio (1−k):k of a time position from the point q and the point r to calculate Ft+k(p) in the following expression.Ft+k(p)=(1−k)Ft(q)+kFt+1(r)
A frame composed of the pixel in which the pixel value is computed in the above-mentioned manner becomes the interpolation frame.
However, for example, in a case where the interpolation frame is generated in a moving image where a background and a foreground have different motions as two animal bodies, between a time t0 and a time t1, depending on areas of the image, motion vectors in different directions are generated. As a result, an area through which the motion vector does not pass is generated at a time of generating the interpolation frame, and it is thus difficult to generate the interpolation frame.
In such a case, up to now, in order to generate the interpolation frame, for example, a vector compensation utilizing a surrounding motion vector or the like is performed. At this time, allocation of the motion vector is performed in such a manner that a sum of absolute differences between two faces (DFD: Displaced Frame Difference) becomes minimum.
The sum of the absolute differences DFD is used, for example, as an evaluation value of the motion amount, and calculated between blocks shifted by a targeted vector amount. In general, as the DFD is smaller, waveforms of the blocks between the frames are matched in a finer manner, and it can be determined that the reliability of the motion vector is high. For example, the sum of the absolute differences DFD is utilized in a case where a plausible vector is chosen from a plurality of candidates and the like.
Also, in order to alleviate an appearance of collapse of the interpolation frame and improve a subjective image quality, such a method has been proposed that the pixel value calculated at the time of the interpolation frame generation is mixed with the pixel value having been subjected to the time interpolation by using a vector having the size of 0 (that is, a vector (0, 0), which will be hereinafter referred to as 0 vector) at a certain ratio (for example, see Japanese Unexamined Patent Application Publication No. 2007-74588). With this configuration, it is possible to obscure the graphical collapse.